package game

import "sync"

const (
	Task_State_Init = 0
	Task_State_Doing = 1
	Task_state_Finish = 2
)

type Player struct {
	ModPlayer		*ModPlayer
	ModIcon			*ModIcon
	ModCard			*ModCard
	ModUniqueTask	*ModUniqueTask
	ModRole			*ModRole
}

func NewTestPlayer() *Player {
	player := new(Player)
	player.ModPlayer = new(ModPlayer)
	player.ModIcon = new(ModIcon)
	player.ModCard = new(ModCard)
	player.ModUniqueTask = new(ModUniqueTask)
	player.ModUniqueTask.Locker = new(sync.Locker)
	player.ModRole = new(ModRole)

	/***********************************************/
	player.ModPlayer.Icon = 0
	player.ModPlayer.Card = 0
	player.ModPlayer.PlayerLevel = 1
	player.ModPlayer.PlayerExp = 0
	player.ModPlayer.WorldLevel = 6
	player.ModPlayer.WorldLevelNow = player.ModPlayer.WorldLevel
	/***********************************************/

	return player
}

func (self *Player) RecvSetIcon(iconId int)  {
	self.ModPlayer.SetIcon(self, iconId)
}

func (self *Player) RecvSetCard(card int)  {
	self.ModPlayer.SetCard(self, card)
}

func (self *Player) RecvSetName(name string)  {
	self.ModPlayer.SetName(self, name)
}

func (self *Player) RecvSetSign(sign string)  {
	self.ModPlayer.SetSign(self, sign)
}

func (self *Player) ReduceWorldLevel()  {
	self.ModPlayer.ReduceWorldLevel(self)
}

func (self *Player) ReturnWorldLevel()  {
	self.ModPlayer.ReturnWorldLevel(self)
}

func (self *Player) SetBirth(birth int)  {
	self.ModPlayer.SetBirth(self, birth)
}

func (self *Player) SetShowCards(cardsId []int) {
	self.ModPlayer.SetShowCards(self, cardsId)
}

func (self *Player) SetShowTeam(showRolesId []int)  {
	self.ModPlayer.SetShowTeam(self, showRolesId)
}

func (self *Player) SetHidenShowTeam(isHiden int)  {
	self.ModPlayer.SetHidenShowTeam(self, isHiden)
}